package com.dtf.admin.staff.service;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;

import org.springframework.stereotype.Service;

import com.dtf.admin.staff.form.StaffForm;
import com.dtf.admin.staff.vo.SystemStaff;
import com.dtf.core.common.service.BaseService;
import com.dtf.core.common.vo.Pagination;

/**
 * @Project: crm
 * @Title: SystemStaffServiceImp.java
 * @Package com.sys.web.systemstaff.service.imp
 * @Description: TODO
 * @author Administrator
 * @date 2015年6月23日 下午10:02:49
 * @Copyright 2015
 * @version V1.0
 */
@Service
public class SystemStaffService extends BaseService{

	public Map listStaff(StaffForm form) {
		String sql = "select * from System_Staff where organization_id=?";
		List params = new ArrayList();
		params.add(form.getOrganization_id());
		
		return super.getDaoSupport().queryListMapJGPage(sql, params, form.getPageSize(), form.getPage());
	}
	
	public Map findSystemStaffById(String id){
		String sql = "select a.*,b.organization_name from System_Staff a join System_Organization b"
				+ " on a.organization_Id = b.organization_Id"
				+ " where a.staff_Id=? ";
		ArrayList params = new ArrayList();
		params.add(id);
		return super.queryMapForSQL(sql, params.toArray());
	}
}
